diff --git a/common/cmd_doc.c b/common/cmd_doc.c
index 293b1aa..bf2f0a9 100644
--- a/common/cmd_doc.c
+++ b/common/cmd_doc.c
@@ -205,6 +205,9 @@
 	ulong offset = 0;
 	image_header_t *hdr;
 	int rcode = 0;
+#if defined(CONFIG_FIT)
+	const void *fit_hdr;
+#endif
 
 	show_boot_progress (34);
 	switch (argc) {
@@ -265,29 +268,30 @@
 	case IMAGE_FORMAT_LEGACY:
 		hdr = (image_header_t *)addr;
 
-		if (image_check_magic (hdr)) {
+		image_print_contents (hdr);
 
-			image_print_contents (hdr);
-
-			cnt = image_get_image_size (hdr);
-			cnt -= SECTORSIZE;
-		} else {
-			puts ("\n** Bad Magic Number **\n");
-			show_boot_progress (-39);
-			return 1;
-		}
+		cnt = image_get_image_size (hdr);
 		break;
 #if defined(CONFIG_FIT)
 	case IMAGE_FORMAT_FIT:
-		fit_unsupported ("docboot");
-		return 1;
+		fit_hdr = (const void *)addr;
+		if (!fit_check_format (fit_hdr)) {
+			puts ("** Bad FIT image format\n");
+			return 1;
+		}
+		puts ("Fit image detected...\n");
+
+		cnt = fit_get_size (fit_hdr);
+		break;
 #endif
 	default:
+		show_boot_progress (-39);
 		puts ("** Unknown image type\n");
 		return 1;
 	}
 	show_boot_progress (39);
 
+	cnt -= SECTORSIZE;
 	if (doc_rw (doc_dev_desc + dev, 1, offset + SECTORSIZE, cnt,
 		    NULL, (u_char *)(addr+SECTORSIZE))) {
 		printf ("** Read error on %d\n", dev);
@@ -296,6 +300,12 @@
 	}
 	show_boot_progress (40);
 
+#if defined(CONFIG_FIT)
+	/* This cannot be done earlier, we need complete FIT image in RAM first */
+	if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT)
+		fit_print_contents ((const void *)addr);
+#endif
+
 	/* Loading ok, update default load address */
 
 	load_addr = addr;
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c
index 80301b9..bf28370 100644
--- a/common/cmd_fdc.c
+++ b/common/cmd_fdc.c
@@ -788,6 +788,9 @@
 	int i,nrofblk;
 	char *ep;
 	int rcode = 0;
+#if defined(CONFIG_FIT)
+	const void *fit_hdr;
+#endif
 
 	switch (argc) {
 	case 1:
@@ -839,18 +842,21 @@
 	switch (genimg_get_format ((void *)addr)) {
 	case IMAGE_FORMAT_LEGACY:
 		hdr = (image_header_t *)addr;
-		if (!image_check_magic (hdr)) {
-			printf ("Bad Magic Number\n");
-			return 1;
-		}
 		image_print_contents (hdr);
 
 		imsize = image_get_image_size (hdr);
 		break;
 #if defined(CONFIG_FIT)
 	case IMAGE_FORMAT_FIT:
-		fit_unsupported ("fdcboot");
-		return 1;
+		fit_hdr = (const void *)addr;
+		if (!fit_check_format (fit_hdr)) {
+			puts ("** Bad FIT image format\n");
+			return 1;
+		}
+		puts ("Fit image detected...\n");
+
+		imsize = fit_get_size (fit_hdr);
+		break;
 #endif
 	default:
 		puts ("** Unknown image type\n");
@@ -872,9 +878,16 @@
 	printf("OK %ld Bytes loaded.\n",imsize);
 
 	flush_cache (addr, imsize);
-	/* Loading ok, update default load address */
 
+#if defined(CONFIG_FIT)
+	/* This cannot be done earlier, we need complete FIT image in RAM first */
+	if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT)
+		fit_print_contents ((const void *)addr);
+#endif
+
+	/* Loading ok, update default load address */
 	load_addr = addr;
+
 	/* Check if we should attempt an auto-start */
 	if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) {
 		char *local_args[2];
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 79b7dfb..6a67dd6 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -370,6 +370,9 @@
 	disk_partition_t info;
 	image_header_t *hdr;
 	int rcode = 0;
+#if defined(CONFIG_FIT)
+	const void *fit_hdr;
+#endif
 
 	show_boot_progress (41);
 	switch (argc) {
@@ -450,11 +453,6 @@
 	case IMAGE_FORMAT_LEGACY:
 		hdr = (image_header_t *)addr;
 
-		if (!image_check_magic (hdr)) {
-			printf("\n** Bad Magic Number **\n");
-			show_boot_progress (-49);
-			return 1;
-		}
 		show_boot_progress (49);
 
 		if (!image_check_hcrc (hdr)) {
@@ -470,10 +468,18 @@
 		break;
 #if defined(CONFIG_FIT)
 	case IMAGE_FORMAT_FIT:
-		fit_unsupported ("diskboot");
-		return 1;
+		fit_hdr = (const void *)addr;
+		if (!fit_check_format (fit_hdr)) {
+			puts ("** Bad FIT image format\n");
+			return 1;
+		}
+		puts ("Fit image detected...\n");
+
+		cnt = fit_get_size (fit_hdr);
+		break;
 #endif
 	default:
+		show_boot_progress (-49);
 		puts ("** Unknown image type\n");
 		return 1;
 	}
@@ -490,6 +496,11 @@
 	}
 	show_boot_progress (51);
 
+#if defined(CONFIG_FIT)
+	/* This cannot be done earlier, we need complete FIT image in RAM first */
+	if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT)
+		fit_print_contents ((const void *)addr);
+#endif
 
 	/* Loading ok, update default load address */
 
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 86959dc..9a168ea 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -484,6 +484,9 @@
 	ulong cnt;
 	image_header_t *hdr;
 	int jffs2 = 0;
+#if defined(CONFIG_FIT)
+	const void *fit_hdr;
+#endif
 
 	s = strchr(cmd, '.');
 	if (s != NULL &&
@@ -516,24 +519,25 @@
 	case IMAGE_FORMAT_LEGACY:
 		hdr = (image_header_t *)addr;
 
-		if (!image_check_magic (hdr)) {
-			printf("\n** Bad Magic Number 0x%x **\n",
-					image_get_magic (hdr));
-			show_boot_progress (-57);
-			return 1;
-		}
 		show_boot_progress (57);
-
 		image_print_contents (hdr);
 
 		cnt = image_get_image_size (hdr);
 		break;
 #if defined(CONFIG_FIT)
 	case IMAGE_FORMAT_FIT:
-		fit_unsupported ("nand_load_image");
-		return 1;
+		fit_hdr = (const void *)addr;
+		if (!fit_check_format (fit_hdr)) {
+			puts ("** Bad FIT image format\n");
+			return 1;
+		}
+		puts ("Fit image detected...\n");
+
+		cnt = fit_get_size (fit_hdr);
+		break;
 #endif
 	default:
+		show_boot_progress (-57);
 		puts ("** Unknown image type\n");
 		return 1;
 	}
@@ -557,6 +561,12 @@
 	}
 	show_boot_progress (58);
 
+#if defined(CONFIG_FIT)
+	/* This cannot be done earlier, we need complete FIT image in RAM first */
+	if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT)
+		fit_print_contents ((const void *)addr);
+#endif
+
 	/* Loading ok, update default load address */
 
 	load_addr = addr;
@@ -939,6 +949,10 @@
 	ulong offset = 0;
 	image_header_t *hdr;
 	int rcode = 0;
+#if defined(CONFIG_FIT)
+	const void *fit_hdr;
+#endif
+
 	show_boot_progress (52);
 	switch (argc) {
 	case 1:
@@ -997,26 +1011,25 @@
 	switch (genimg_get_format ((void *)addr)) {
 	case IMAGE_FORMAT_LEGACY:
 		hdr = (image_header_t *)addr;
+		image_print_contents (hdr);
 
-		if (image_check_magic (hdr)) {
-
-			image_print_contents (hdr);
-
-			cnt = image_get_image_size (hdr);
-			cnt -= SECTORSIZE;
-		} else {
-			printf ("\n** Bad Magic Number 0x%x **\n",
-					image_get_magic (hdr));
-			show_boot_progress (-57);
-			return 1;
-		}
+		cnt = image_get_image_size (hdr);
+		cnt -= SECTORSIZE;
 		break;
 #if defined(CONFIG_FIT)
 	case IMAGE_FORMAT_FIT:
-		fit_unsupported ("nboot");
-		return 1;
+		fit_hdr = (const void *)addr;
+		if (!fit_check_format (fit_hdr)) {
+			puts ("** Bad FIT image format\n");
+			return 1;
+		}
+		puts ("Fit image detected...\n");
+
+		cnt = fit_get_size (fit_hdr);
+		break;
 #endif
 	default:
+		show_boot_progress (-57);
 		puts ("** Unknown image type\n");
 		return 1;
 	}
@@ -1031,6 +1044,12 @@
 	}
 	show_boot_progress (58);
 
+#if defined(CONFIG_FIT)
+	/* This cannot be done earlier, we need complete FIT image in RAM first */
+	if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT)
+		fit_print_contents ((const void *)addr);
+#endif
+
 	/* Loading ok, update default load address */
 
 	load_addr = addr;
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index 7868805..f49531e 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -211,6 +211,9 @@
 	disk_partition_t info;
 	image_header_t *hdr;
 	int rcode = 0;
+#if defined(CONFIG_FIT)
+	const void *fit_hdr;
+#endif
 
 	switch (argc) {
 	case 1:
@@ -277,11 +280,6 @@
 	case IMAGE_FORMAT_LEGACY:
 		hdr = (image_header_t *)addr;
 
-		if (!image_check_magic (hdr)) {
-			printf("\n** Bad Magic Number **\n");
-			return 1;
-		}
-
 		if (!image_check_hcrc (hdr)) {
 			puts ("\n** Bad Header Checksum **\n");
 			return 1;
@@ -292,8 +290,15 @@
 		break;
 #if defined(CONFIG_FIT)
 	case IMAGE_FORMAT_FIT:
-		fit_unsupported ("scsi");
-		return 1;
+		fit_hdr = (const void *)addr;
+		if (!fit_check_format (fit_hdr)) {
+			puts ("** Bad FIT image format\n");
+			return 1;
+		}
+		puts ("Fit image detected...\n");
+
+		cnt = fit_get_size (fit_hdr);
+		break;
 #endif
 	default:
 		puts ("** Unknown image type\n");
@@ -309,6 +314,13 @@
 		printf ("** Read error on %d:%d\n", dev, part);
 		return 1;
 	}
+
+#if defined(CONFIG_FIT)
+	/* This cannot be done earlier, we need complete FIT image in RAM first */
+	if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT)
+		fit_print_contents ((const void *)addr);
+#endif
+
 	/* Loading ok, update default load address */
 	load_addr = addr;
 
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index 8ee7d27..bf56c6a 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -315,7 +315,9 @@
 	disk_partition_t info;
 	image_header_t *hdr;
 	block_dev_desc_t *stor_dev;
-
+#if defined(CONFIG_FIT)
+	const void *fit_hdr;
+#endif
 
 	switch (argc) {
 	case 1:
@@ -390,11 +392,6 @@
 	case IMAGE_FORMAT_LEGACY:
 		hdr = (image_header_t *)addr;
 
-		if (!image_check_magic (hdr)) {
-			printf("\n** Bad Magic Number **\n");
-			return 1;
-		}
-
 		if (!image_check_hcrc (hdr)) {
 			puts ("\n** Bad Header Checksum **\n");
 			return 1;
@@ -406,8 +403,15 @@
 		break;
 #if defined(CONFIG_FIT)
 	case IMAGE_FORMAT_FIT:
-		fit_unsupported ("usbboot");
-		return 1;
+		fit_hdr = (const void *)addr;
+		if (!fit_check_format (fit_hdr)) {
+			puts ("** Bad FIT image format\n");
+			return 1;
+		}
+		puts ("Fit image detected...\n");
+
+		cnt = fit_get_size (fit_hdr);
+		break;
 #endif
 	default:
 		puts ("** Unknown image type\n");
@@ -423,6 +427,13 @@
 		printf ("\n** Read error on %d:%d\n", dev, part);
 		return 1;
 	}
+
+#if defined(CONFIG_FIT)
+	/* This cannot be done earlier, we need complete FIT image in RAM first */
+	if (genimg_get_format ((void *)addr) == IMAGE_FORMAT_FIT)
+		fit_print_contents ((const void *)addr);
+#endif
+
 	/* Loading ok, update default load address */
 	load_addr = addr;
 
